package nrpc.client.slst;

import java.lang.reflect.Method;
import java.nio.channels.SocketChannel;
import java.util.Iterator;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;

import nrpc.client.serst.ServiceNode;
import nrpc.exception.NotServiceNodeException;

/**
 * 负载均衡策略（连接选择策略）
 */
public interface SelectStrategy {

//	SocketChannel activateChannel(Method method, List<Object> args);
	
//	void backChannel(SocketChannel socketChannel);
	
	Iterator<ServiceNode> getNode(Method method, List<Object> args);
	
	void deleteNode(ServiceNode node);
	
//	void activateChannel(Method method, List<Object> args, Function<? super SocketChannel, ? extends Boolean> active);	
	
	void close();
	
}
